using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using System.IO;

namespace Business
{
    public class Startup
    {
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddApplication<BusinessHostModule>();
            //Swagger注释
            services.AddSwaggerGen(x =>
            {
                var basePath = Path.GetDirectoryName(typeof(BusinessHostModule).Assembly.Location);
                var xml = Path.Combine(basePath, "Business.HttpApi.xml");
                x.IncludeXmlComments(xml);
            });
          

            
        }

        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
        {
            app.InitializeApplication();
        }
    }
}
